<?php

  class Seq
  {

      /**
       * Magic method to set the propierties.
       *
       * @param string $name  The propierty name
       * @param string $value The propierty value
       */
      public function __set($name, $value)
      {
          $this->$name = $value;
      }

      /**
       * @see get()
       * 
       * @example $sequence->chars
       */
      public function __get($name)
      {
          return $this->get($name);
      }

      /**
       * 
       * <code>
       * $sequence->get*()
       * </code>
       * 
       * (*)The propierty name
       * 
       * 
       */
      public function __call($name, $arguments)
      {
          $name = strtolower(substr($name, 3));

          return $this->get($name);
      }

      /**
       * Get the value of the propierty associated with the name.
       *
       * @param  string $name  The propierty name
       * @return string        The value of the propierty if exists, null otherwise
       * 
       * <code>
       * $sequence->get('chars')
       * </code>
       */
      public function get($name)
      {
          return isset($this->$name) ? $this->$name : null;
      }
      
      public function set($name, $value)
      {
          $this->__set($name, $value);
      }

  }

?>
